@@ -389,6 +389,39 @@ object.
389389
390390[ `Temporal.Instant` ] : https://tc39.es/proposal-temporal/docs/instant.html
391391
392+ ### Want more?
393+
394+ If you want more data from the message, you can get the raw object of
395+ the message through the ` ~Message.raw ` property. It is an instance of one
396+ of [ ` Article ` ] , [ ` ChatMessage ` ] , [ ` Note ` ] , or [ ` Question ` ] class (which are
397+ provided by Fedify). You can get the raw data from the object.
398+
399+ For example, if you want to get the location of the message (Pixelfed et al.
400+ provide the geo location of the message), you can get it through
401+ the ` ~Message.raw ` property:
402+
403+ ~~~~ typescript
404+ const location = await message .raw .getLocation ();
405+ if (location instanceof Place ) {
406+ console .log (location .name );
407+ console .log (location .latitude );
408+ console .log (location .longitude );
409+ }
410+ ~~~~
411+
412+ In the above example, the [ ` Place ` ] class is declared by Fedify, so you need to
413+ install it and import it:
414+
415+ ~~~~ typescript
416+ import { Place } from " @fedify/fedify/vocab" ;
417+ ~~~~
418+
419+ [ `Article` ] : https://jsr.io/@fedify/fedify/doc/vocab/~/Article
420+ [ `ChatMessage` ] : https://jsr.io/@fedify/fedify/doc/vocab/~/ChatMessage
421+ [ `Note` ] : https://jsr.io/@fedify/fedify/doc/vocab/~/Note
422+ [ `Question` ] : https://jsr.io/@fedify/fedify/doc/vocab/~/Question
423+ [ `Place` ] : https://jsr.io/@fedify/fedify/doc/vocab/~/Place
424+
392425
393426Deleting a message
394427------------------
0 commit comments